import 'package:flutter/material.dart';

class LoginEffect extends StatefulWidget {
  final bool protect;

  const LoginEffect({super.key, required this.protect});

  @override
  State<LoginEffect> createState() => _LoginEffectState();
}

class _LoginEffectState extends State<LoginEffect> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
        color: Colors.grey[100],
        border: Border(bottom: BorderSide(color: Colors.grey[300]!)),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          _image(),
          const Image(
            image: AssetImage('images/a.jpg'),
            height: 100,
            width: 100,
          ),
          _image(),
        ],
      ),
    );
  }

  _image() {
    var headLeft = widget.protect ? 'images/d.jpg' : 'images/b.jpg';
    return Image(
      image: AssetImage(headLeft),
      height: 100,
      width: 100,
    );
  }
}
